﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml;
using System.Xml.Linq;
namespace CPPEI.Coolzon.Common
{
    public static class XElementHelper
    {
        public static string GetXElementValue(this XElement xe, string xeName)
        {
            XElement xElement = xe.Element(xeName);
            if (xElement == null)
            {
                return null;
            }
            return xElement.Value;
        }
        public static string GetXAttributeValue(this XElement xe, string xattrName)
        {

            XAttribute res = xe.Attribute(xattrName);
            if (res == null)
            {
                return null;
            }
            return res.Value;
        }
    }
}
